home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global dgBlueColor, dgYellowColor, dgDkBlueColor
- set dgBlueColor to the foreColor of member "blueModel"
- set dgYellowColor to the foreColor of member "yellowModel"
- set dgDkBlueColor to the foreColor of member "dkBlueModel"
- initCreate()
- end
-
- on stopMovie
- closeCreate()
- end
-
- on closeWindow
- set theList to the windowList
- repeat with i = 1 to count(theList)
- set theItem to string(getAt(theList, i))
- delete word 1 of theItem
- delete char 1 of theItem
- set theChar to the number of chars in theItem
- delete char theChar - 1 to theChar of theItem
- if (theItem contains "Database Designer") or (theItem contains "FFDESIG") then
- forget(window theItem)
- end if
- end repeat
- tell the stage
- puppetPalette(0)
- end tell
- tell the stage
- updateStage()
- end tell
- end
-
- on initCreate
- global topPointsToLine, baseSprite, spriteArray, dgBlueColor, dgYellowColor
- set baseSprite to 28
- puppetSprite(23, 1)
- set the loc of sprite 23 to point(228, 356)
- puppetSprite(45, 1)
- puppetSprite(46, 1)
- puppetSprite(47, 1)
- locHide(45)
- locHide(46)
- locHide(47)
- hideDefineField()
- put EMPTY into field "visNameList"
- put EMPTY into field "visTypeList"
- put EMPTY into field "visWidthList"
- put EMPTY into field "visDecimalsList"
- put EMPTY into field "masterNameList"
- put EMPTY into field "masterTypeList"
- put EMPTY into field "masterWidthList"
- put EMPTY into field "masterDecimalsList"
- set the textHeight of member "visNameList" to 16
- set the textHeight of member "visTypeList" to 16
- set the textHeight of member "visWidthList" to 16
- set the textHeight of member "visDecimalsList" to 16
- set the textSize of member "visNameList" to 12
- set the textSize of member "visTypeList" to 12
- set the textSize of member "visWidthList" to 12
- set the textSize of member "visDecimalsList" to 12
- set the foreColor of member "visNameList" to dgYellowColor
- set the foreColor of member "visTypeList" to dgYellowColor
- set the foreColor of member "visWidthList" to dgYellowColor
- set the foreColor of member "visDecimalsList" to dgYellowColor
- set topPointsToLine to 1
- set the loc of sprite baseSprite to point(-29, -9)
- set the loc of sprite (baseSprite + 1) to point(291, 186)
- set the loc of sprite (baseSprite + 2) to point(274, 262)
- set the loc of sprite (baseSprite + 3) to point(437, 80)
- set the loc of sprite (baseSprite + 4) to point(369, 79)
- set the loc of sprite (baseSprite + 5) to point(257, 245)
- set the loc of sprite (baseSprite + 6) to point(413, 188)
- set the loc of sprite (baseSprite + 7) to point(334, 161)
- set the loc of sprite (baseSprite + 8) to point(369, 151)
- set the loc of sprite (baseSprite + 9) to point(374, 195)
- set the loc of sprite (baseSprite + 10) to point(286, 163)
- set the loc of sprite (baseSprite + 11) to point(288, 214)
- set the loc of sprite (baseSprite + 12) to point(269, 107)
- repeat with i = baseSprite to baseSprite + 12
- locHide(i)
- end repeat
- end
-
- on closeCreate
- locHide(45)
- locHide(46)
- locHide(47)
- puppetSprite(45, 0)
- puppetSprite(46, 0)
- puppetSprite(47, 0)
- puppetSprite(23, 0)
- put EMPTY into field "visNameList"
- put EMPTY into field "visTypeList"
- put EMPTY into field "visWidthList"
- put EMPTY into field "visDecimalsList"
- put EMPTY into field "masterNameList"
- put EMPTY into field "masterTypeList"
- put EMPTY into field "masterWidthList"
- put EMPTY into field "masterDecimalsList"
- end
-
- on showDefineField panel
- global baseSprite, fieldSpec, keyEditOK
- locHide(45)
- locHide(46)
- locHide(47)
- updateStage()
- set baseSprite to 28
- repeat with i = baseSprite to baseSprite + 12
- puppetSprite(i, 1)
- end repeat
- updateStage()
- locShow(baseSprite)
- locShow(baseSprite + 1)
- set theType to word 1 of panel
- case theType of
- "text":
- set fieldSpec to ",C,25"
- "numeric":
- set fieldSpec to ",N,3,2"
- "boolean":
- set fieldSpec to ",L"
- "memo":
- set fieldSpec to ",M"
- "date":
- set fieldSpec to ",D"
- end case
- setDefineField()
- set keyEditOK to 1
- end
-
- on setDefineField
- global baseSprite, fieldSpec, dgDkBlueColor
- set the itemDelimiter to ","
- set theName to item 1 of fieldSpec
- if theName = EMPTY then
- put "_" into field "FieldEntry"
- else
- put theName into field "FieldEntry"
- end if
- set theType to item 2 of fieldSpec
- if (theType = "C") or (theType = "N") then
- set theWidth to item 3 of fieldSpec
- end if
- if theType = "N" then
- set theDecimals to item 4 of fieldSpec
- end if
- case theType of
- "C":
- set the loc of sprite (baseSprite + 2) to point(274, 262)
- "N":
- set the loc of sprite (baseSprite + 2) to point(312, 262)
- "L":
- set the loc of sprite (baseSprite + 2) to point(350, 262)
- "D":
- set the loc of sprite (baseSprite + 2) to point(388, 262)
- "M":
- set the loc of sprite (baseSprite + 2) to point(426, 262)
- otherwise:
- set the loc of sprite (baseSprite + 2) to point(274, 262)
- end case
- locShow(baseSprite + 3)
- locShow(baseSprite + 4)
- locShow(baseSprite + 5)
- set the text of member "widthData" to EMPTY
- set the text of member "decimalsData" to EMPTY
- locHide(baseSprite + 8)
- locHide(baseSprite + 9)
- locShow(baseSprite + 10)
- locShow(baseSprite + 11)
- set the textStyle of member "decimalsData" to "bold"
- set the textFont of member "decimalsData" to "helvetica"
- set the textSize of member "decimalsData" to 9
- set the textStyle of member "widthData" to "bold"
- set the textFont of member "widthData" to "helvetica"
- set the textSize of member "widthData" to 9
- set the textAlign of member "widthData" to "right"
- set the textAlign of member "decimalsData" to "right"
- set the foreColor of member "decimalsData" to dgDkBlueColor
- set the foreColor of member "widthData" to dgDkBlueColor
- if theType = "C" then
- locShow(baseSprite + 8)
- locShow(baseSprite + 6)
- fieldWidthValue(theWidth, 255)
- locHide(baseSprite + 10)
- end if
- if theType = "N" then
- locShow(baseSprite + 8)
- locShow(baseSprite + 9)
- locShow(baseSprite + 6)
- fieldWidthValue(theWidth, 10)
- locShow(baseSprite + 7)
- decimalsWidthValue(theDecimals, 8)
- locHide(baseSprite + 10)
- locHide(baseSprite + 11)
- end if
- locShow(baseSprite + 12)
- updateStage()
- end
-
- on hideDefineField
- global baseSprite, spriteArray, keyEditOK
- set keyEditOK to 0
- set baseSprite to 28
- repeat with i = baseSprite to baseSprite + 12
- locHide(i)
- end repeat
- updateStage()
- repeat with i = baseSprite to baseSprite + 12
- puppetSprite(i, 0)
- end repeat
- end
-
- on fieldWidthValue width, widthMax
- global fieldSpec, dgDkBlueColor, baseSprite
- locHide(baseSprite + 6)
- set dragY to 173
- set dragMin to 136
- set dragMax to 439
- set zoneSize to dragMax - dragMin
- set perItemWidth to float(zoneSize) / float(widthMax)
- if width < 1 then
- set width to 1
- end if
- set pixelsOver to float(width) * float(perItemWidth)
- set theX to dragMin + integer(pixelsOver)
- set the loc of sprite (baseSprite + 6) to point(theX, dragY)
- set the text of member "widthData" to string(integer(width))
- put string(integer(width)) into item 3 of fieldSpec
- set the textStyle of member "widthData" to "bold"
- set the textFont of member "widthData" to "helvetica"
- set the textSize of member "widthData" to 9
- set the textAlign of member "widthData" to "right"
- set the foreColor of member "widthData" to dgDkBlueColor
- end
-
- on fieldWidthPixel Xcoord, widthMax
- global baseSprite, fieldSpec, dgDkBlueColor
- set dragY to 173
- set dragMin to 136
- set dragMax to 439
- set zoneSize to dragMax - dragMin
- set perItemWidth to float(zoneSize) / float(widthMax)
- if Xcoord < dragMin then
- set Xcoord to dragMin
- end if
- if Xcoord > dragMax then
- set Xcoord to dragMax
- end if
- set Xoffset to Xcoord - dragMin
- set width to integer(float(Xoffset) / float(perItemWidth))
- if width < 1 then
- set width to 1
- end if
- set pixelsOver to float(width) * float(perItemWidth)
- set theX to dragMin + integer(pixelsOver)
- set the loc of sprite (baseSprite + 6) to point(theX, dragY)
- set the text of member "widthData" to string(integer(width))
- put string(integer(width)) into item 3 of fieldSpec
- set the textStyle of member "widthData" to "bold"
- set the textFont of member "widthData" to "helvetica"
- set the textSize of member "widthData" to 9
- set the textAlign of member "widthData" to "right"
- set the foreColor of member "widthData" to dgDkBlueColor
- updateStage()
- end
-
- on decimalsWidthValue width, widthMax
- global baseSprite, dgDkBlueColor
- locHide(baseSprite + 7)
- set dragY to 217
- set dragMin to 241
- set dragMax to 439
- set zoneSize to dragMax - dragMin
- set perItemWidth to float(zoneSize) / float(widthMax)
- set pixelsOver to float(width) * float(perItemWidth)
- set theX to dragMin + integer(pixelsOver)
- set the loc of sprite (baseSprite + 7) to point(theX, dragY)
- set the text of member "decimalsData" to string(integer(width))
- put string(integer(width)) into item 4 of fieldSpec
- set the textStyle of member "decimalsData" to "bold"
- set the textFont of member "decimalsData" to "helvetica"
- set the textAlign of member "decimalsData" to "right"
- set the textSize of member "decimalsData" to 9
- set the foreColor of member "decimalsData" to dgDkBlueColor
- end
-
- on decimalsWidthPixel Xcoord, widthMax
- global baseSprite, fieldSpec, dgDkBlueColor
- set dragY to 217
- set dragMin to 241
- set dragMax to 439
- set zoneSize to dragMax - dragMin
- set perItemWidth to float(zoneSize) / float(widthMax)
- if Xcoord < dragMin then
- set Xcoord to dragMin
- end if
- if Xcoord > dragMax then
- set Xcoord to dragMax
- end if
- set Xoffset to Xcoord - dragMin
- set width to integer(float(Xoffset) / float(perItemWidth))
- set pixelsOver to float(width) * float(perItemWidth)
- set theX to dragMin + integer(pixelsOver)
- set the loc of sprite (baseSprite + 7) to point(theX, dragY)
- set the text of member "decimalsData" to string(integer(width))
- put string(integer(width)) into item 4 of fieldSpec
- set the textStyle of member "decimalsData" to "bold"
- set the textFont of member "decimalsData" to "helvetica"
- set the textSize of member "decimalsData" to 9
- set the textAlign of member "decimalsData" to "right"
- set the foreColor of member "decimalsData" to dgDkBlueColor
- updateStage()
- end
-
- on locHide theSprite
- global spriteArray
- set the itemDelimiter to "|"
- set thePoint to the loc of sprite theSprite
- if thePoint <> point(-900, -900) then
- put string(thePoint) into item theSprite of spriteArray
- set the loc of sprite theSprite to point(-900, -900)
- end if
- set the itemDelimiter to ","
- end
-
- on locShow theSprite
- global spriteArray
- set the itemDelimiter to "|"
- set theStringPoint to item theSprite of spriteArray
- set the loc of sprite theSprite to value(theStringPoint)
- set the itemDelimiter to ","
- end
-
- on initIndex
- global topPointsToLine, baseSprite, spriteArray, dgYellowColor, dgDkBlueColor
- puppetSprite(23, 1)
- set the loc of sprite 23 to point(358, 300)
- updateStage()
- puppetSprite(45, 1)
- puppetSprite(46, 1)
- puppetSprite(47, 1)
- locHide(45)
- locHide(46)
- locHide(47)
- put EMPTY into field "visNameList"
- put EMPTY into field "visTypeList"
- put EMPTY into field "visWidthList"
- put EMPTY into field "visDecimalsList"
- put EMPTY into field "masterNameList"
- put EMPTY into field "masterTypeList"
- put EMPTY into field "masterWidthList"
- put EMPTY into field "masterDecimalsList"
- put EMPTY into field "indexExpr"
- set the textHeight of member "visNameList" to 16
- set the textHeight of member "visTypeList" to 16
- set the textHeight of member "visWidthList" to 16
- set the textHeight of member "visDecimalsList" to 16
- set the textSize of member "visNameList" to 12
- set the textSize of member "visTypeList" to 12
- set the textSize of member "visWidthList" to 12
- set the textSize of member "visDecimalsList" to 12
- set the foreColor of member "visNameList" to dgYellowColor
- set the foreColor of member "visTypeList" to dgYellowColor
- set the foreColor of member "visWidthList" to dgYellowColor
- set the foreColor of member "visDecimalsList" to dgYellowColor
- set topPointsToLine to 1
- set the loc of sprite baseSprite to point(-29, -9)
- set the loc of sprite (baseSprite + 1) to point(291, 186)
- set the loc of sprite (baseSprite + 3) to point(437, 80)
- locHide(baseSprite)
- locHide(baseSprite + 1)
- locHide(baseSprite + 3)
- set the loc of sprite 14 to point(343, 192)
- locHide(14)
- put "This area is used to construct an index expression:" into field "indexMessage"
- set the foreColor of member "indexMessage" to dgDkBlueColor
- set the textSize of member "indexMessage" to 9
- set the textStyle of member "indexMessage" to "bold"
- set the textFont of member "indexMessage" to "Helvetica"
- updateStage()
- end
-
- on closeIndex
- locHide(45)
- locHide(46)
- locHide(47)
- puppetSprite(45, 0)
- puppetSprite(46, 0)
- puppetSprite(47, 0)
- puppetSprite(23, 0)
- put EMPTY into field "visNameList"
- put EMPTY into field "visTypeList"
- put EMPTY into field "visWidthList"
- put EMPTY into field "visDecimalsList"
- put EMPTY into field "masterNameList"
- put EMPTY into field "masterTypeList"
- put EMPTY into field "masterWidthList"
- put EMPTY into field "masterDecimalsList"
- put "This area used to construct an index expression:" into field "indexMessage"
- end
-
- on moveIt theSprite, theLoc
- set the loc of sprite theSprite to theLoc
- updateStage()
- end
-
- on initBrowse
- global topPointsToLine, baseSprite, spriteArray, dgYellowColor, dgDkBlueColor
- puppetSprite(23, 1)
- set the loc of sprite 23 to point(-900, -900)
- updateStage()
- puppetSprite(45, 1)
- puppetSprite(46, 1)
- puppetSprite(47, 1)
- locHide(45)
- locHide(46)
- locHide(47)
- put EMPTY into field "visNameList"
- put EMPTY into field "visContentList"
- put EMPTY into field "masterNameList"
- put EMPTY into field "masterContentList"
- set the textHeight of member "visNameList" to 16
- set the textHeight of member "visContentList" to 16
- set the textSize of member "visNameList" to 12
- set the textSize of member "visContentList" to 12
- set the foreColor of member "visNameList" to dgYellowColor
- set the foreColor of member "visContentList" to dgYellowColor
- set topPointsToLine to 1
- set the loc of sprite baseSprite to point(-29, -9)
- set the loc of sprite (baseSprite + 1) to point(291, 186)
- set the loc of sprite (baseSprite + 3) to point(437, 80)
- locHide(baseSprite)
- locHide(baseSprite + 1)
- locHide(baseSprite + 3)
- put EMPTY into field "browseMessage"
- set the foreColor of member "browseMessage" to dgDkBlueColor
- set the textSize of member "browseMessage" to 9
- set the textStyle of member "browseMessage" to "bold"
- set the textFont of member "browseMessage" to "Helvetica"
- updateStage()
- end
-
- on closeBrowse
- global dgDkBlueColor
- puppetSprite(23, 0)
- puppetSprite(23, 0)
- put EMPTY into field "visNameList"
- put EMPTY into field "visContentList"
- put EMPTY into field "masterNameList"
- put EMPTY into field "masterContentList"
- put EMPTY into field "browseMessage"
- set the foreColor of member "browseMessage" to dgDkBlueColor
- set the textSize of member "browseMessage" to 9
- set the textStyle of member "browseMessage" to "bold"
- set the textFont of member "browseMessage" to "Helvetica"
- end
-